Skip to content

Conversation

@BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Jan 21, 2026

Supportive PRs:

Closes #1226

This PR includes switches from bundleRequire to jiti. It includes:

  • jiti wrapper code to resolve TS config paths and forward to jiti
  • importModule got refactored to use jiti

Errors:

  • Problem: Access of window.document through 'axe-core' import
    Reproduction: node --input-type=module -e "import('jiti').then(j=>j.default()( 'axe-core'))"
    Error:
    /node_modules/axe-core/axe.js:14
      var document = window.document;
                            ^
    TypeError: Cannot read properties of undefined (reading 'document')
        at axeFunction (/cli/node_modules/axe-core/axe.js:14:25)
        at /cli/node_modules/axe-core/axe.js:32979:3
        at eval_evalModule (/cli/node_modules/jiti/dist/jiti.cjs:1:196325)
        at jitiRequire (/cli/node_modules/jiti/dist/jiti.cjs:1:190233)
        at /cli/node_modules/jiti/dist/jiti.cjs:1:199352
        at file:///cli/[eval1]:1:35
    
    Node.js v24.1.0
    Issues: axe.setup should set globals dequelabs/axe-core#3962
    Preliminalr fix: b7109fb

The following is here just to make it working and will get refactored if the PR is interesting:

  • polyfill for axe (access document as sinde effect)
  • cyclic eslint imports

Related: https://github.com/push-based/ts-jiti

@nx-cloud
Copy link

nx-cloud bot commented Jan 21, 2026

View your CI Pipeline Execution ↗ for commit 7384905

Command Status Duration Result
nx affected -t e2e-test --parallel=1 ❌ Failed 15m 26s View ↗
nx affected -t lint --parallel=3 ❌ Failed 6m 31s View ↗
nx affected -t int-test --parallel=3 ❌ Failed 1m 44s View ↗
nx affected -t unit-test --parallel=3 ✅ Succeeded 1m 42s View ↗
nx run-many --target=build --parallel=3 ✅ Succeeded 35s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-09 00:04:26 UTC

@nx-cloud
Copy link

nx-cloud bot commented Jan 21, 2026

View your CI Pipeline Execution ↗ for commit bbd8648


☁️ Nx Cloud last updated this comment at 2026-01-21 20:43:23 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 21, 2026

Open in StackBlitz

@code-pushup/ci

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/ci@1228

@code-pushup/cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/cli@1228

@code-pushup/core

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/core@1228

@code-pushup/create-cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/create-cli@1228

@code-pushup/models

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/models@1228

@code-pushup/nx-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/nx-plugin@1228

@code-pushup/axe-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/axe-plugin@1228

@code-pushup/coverage-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/coverage-plugin@1228

@code-pushup/eslint-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/eslint-plugin@1228

@code-pushup/js-packages-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/js-packages-plugin@1228

@code-pushup/jsdocs-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/jsdocs-plugin@1228

@code-pushup/lighthouse-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/lighthouse-plugin@1228

@code-pushup/typescript-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/typescript-plugin@1228

@code-pushup/utils

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/utils@1228

commit: 7384905

@github-actions
Copy link
Contributor

github-actions bot commented Jan 21, 2026

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit bfe1b67 with previous commit 3137af7.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Type Safety 🟡 67 🟡 56 ↓ −11.1
Bug prevention 🟡 75 🟡 67 ↓ −8.3
Code style 🟢 100 🟢 96 ↓ −3.9
Performance 🔴 40 🔴 39 ↓ −0.9
Documentation 🟡 53 🟡 53 ↑ +0.1
Updates 🟡 75 🟡 75 ↑ +0.1
Code coverage 🟢 93 🟢 93 ↓ −0.1
Axe Accessibility 🟡 88 🟡 88 ↓ −0.1
Security 🔴 47 🔴 47
Miscellaneous 🟡 67 🟡 67
Accessibility 🟢 92 🟢 92
Best Practices 🟢 100 🟢 100
SEO 🟢 92 🟢 92
👍 2 groups improved, 👎 5 groups regressed, 👍 9 audits improved, 👎 14 audits regressed, 14 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
ESLint No Mutations (functional) 🟢 100 🟡 50 ↓ −50
TypeScript Problems 🔴 33 🔴 0 ↓ −33.3
ESLint Suggestions 🟢 100 🟢 96 ↓ −3.9
Lighthouse Performance 🔴 40 🔴 39 ↓ −0.9
JSDocs coverage Documentation coverage 🟡 53 🟡 53 ↑ +0.1
JS packages npm outdated dependencies 🟡 75 🟡 75 ↑ +0.1
Code coverage Code coverage metrics 🟢 93 🟢 93 ↓ −0.1

27 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
ESLint disallow alias methods 🟩 passed 🟥 463 warnings ↑ +∞ %
Lighthouse Initial server response time was short 🟥 Root document took 660 ms 🟩 Root document took 400 ms ↓ −40.3 %
ESLint Enforce treating data as immutable. 🟩 passed 🟥 3 warnings ↑ +∞ %
ESLint disallow the use of process.exit() 🟩 passed 🟥 3 warnings ↑ +∞ %
TypeScript No implicit any errors 🟩 passed 🟥 3 errors ↑ +∞ %
ESLint Disallow the use of console 🟩 passed 🟥 2 warnings ↑ +∞ %
ESLint Disallow negated conditions. 🟩 passed 🟥 1 warning ↑ +∞ %
ESLint Require braces around arrow function bodies 🟩 passed 🟥 1 warning ↑ +∞ %
ESLint Require template literals instead of string concatenation 🟩 passed 🟥 1 warning ↑ +∞ %
ESLint Enforce padding around describe blocks 🟩 passed 🟥 1 warning ↑ +∞ %
ESLint require toThrow() to be called with an error message 🟩 passed 🟥 1 warning ↑ +∞ %
Lighthouse First Contentful Paint 🟥 3.3 s 🟨 2.9 s ↓ −12.9 %
Lighthouse Total Blocking Time 🟥 1,040 ms 🟥 1,330 ms ↑ +28 %
Lighthouse Max Potential First Input Delay 🟥 620 ms 🟥 1,000 ms ↑ +61 %
Lighthouse Time to Interactive 🟥 13.1 s 🟥 13.0 s ↓ −1 %
Lighthouse Speed Index 🟥 6.8 s 🟥 6.8 s ↓ −0.4 %
JS packages Outdated npm dev dependencies. 🟨 62 outdated package versions (29 major, 25 minor, 8 patch) 🟨 61 outdated package versions (29 major, 24 minor, 8 patch) ↓ −1.6 %
JSDocs coverage Functions coverage 🟥 585 undocumented functions 🟥 587 undocumented functions ↑ +0.3 %
JSDocs coverage Variables coverage 🟥 274 undocumented variables 🟥 279 undocumented variables ↑ +1.8 %
Code coverage Branch coverage 🟨 89.2 % 🟨 89 % ↓ −0.2 %
Code coverage Line coverage 🟩 92.8 % 🟩 92.6 % ↓ −0.2 %
JSDocs coverage Types coverage 🟥 264 undocumented types 🟥 266 undocumented types ↑ +0.8 %
Code coverage Function coverage 🟩 94.4 % 🟩 94.4 % ↑ +0.1 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,089 KiB 🟩 Total size was 2,080 KiB ↓ −0.5 %
Lighthouse Minimizes main-thread work 🟥 8.1 s 🟥 10.1 s ↑ +24.7 %
Lighthouse JavaScript execution time 🟥 2.1 s 🟥 3.1 s ↑ +45.4 %
Lighthouse Uses efficient cache policy on static assets 🟨 31 resources found 🟨 31 resources found ↑ +0.1 %
Lighthouse Largest Contentful Paint 🟥 11.7 s 🟥 11.5 s ↓ −1.8 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 111 KiB 🟥 Potential savings of 111 KiB ↓ −23.3 %
Lighthouse Metrics 🟩 100% 🟩 100% ↓ −1 %
Lighthouse Reduce unused JavaScript 🟥 Potential savings of 225 KiB 🟥 Potential savings of 225 KiB ↓ −10 %
Lighthouse Server Backend Latencies 🟩 300 ms 🟩 200 ms ↓ −34 %
Lighthouse Network Round Trip Times 🟩 70 ms 🟩 10 ms ↓ −89.3 %
TypeScript Semantic errors 🟥 44 errors 🟥 90 errors ↑ +104.5 %
Lighthouse Remove duplicate modules in JavaScript bundles 🟥 Potential savings of 65 KiB 🟥 Potential savings of 93 KiB ↑ +3.3 %
TypeScript Syntax errors 🟥 7 errors 🟥 9 errors ↑ +28.6 %
Lighthouse Cumulative Layout Shift 🟩 0.003 🟩 0 ↓ −100 %

641 other audits are unchanged.

# Conflicts:
#	packages/cli/mocks/configs/code-pushup.needs-tsconfig.config.ts
#	packages/plugin-axe/src/lib/runner/transform.unit.test.ts
#	packages/utils/src/lib/import-module.int.test.ts
#	packages/utils/src/lib/import-module.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test jiti as loader and executor

1 participant